package com.tinshow.web.controller.error;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class ErrorController implements org.springframework.boot.autoconfigure.web.ErrorController{

    private static final String ERROR_PATH = "/error";
	
	@RequestMapping(value = "/403")
	@ResponseBody
	public ModelAndView getErrorFor403(){
		return new ModelAndView("/error/index");
	}
	
	@RequestMapping(value = ERROR_PATH)
	public String getErrorFor404(){
		return "/error/index";
	}

    @Override
    public String getErrorPath() {
        return ERROR_PATH;
    }
}
